<template>
<div class="app-container">
<!--工具栏-->
<div class="head-container">
<div>
<!-- 搜索 -->
<el-select v-model="query.daEquipmentId" filterable class="filter-item" placeholder="选择设备" @change="changeA">
<el-option
v-for="item in equipment.da_equipment"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</div>
<data01 v-if="data01If"/>
<data02 v-if="data02If"/>
</div>
</div>
</template>

<script>
import data01 from '../data01/index_'
import data02 from '../data02/index'
import CRUD, { presenter, header, crud } from '@crud/crud'

// crud交由presenter持有
const defaultCrud = CRUD({})
export default {
name: 'DaSubtaskData01',
components: {data01, data02 },
mixins: [presenter(defaultCrud), header()],
equipments: [],
data() {
return {
data01If: false,
data02If: false
}
},
methods: {
// 获取数据前设置好接口地址
[CRUD.HOOK.beforeRefresh]() {
return false
},
changeA(value){
if(value == 1){
this.data01If = true;
this.data02If = false;
}else if(value == 2){
this.data01If = false;
this.data02If = true;
}
}
}
}
</script>

<style scoped>

</style>
